package mt;

import java.util.HashMap;

import main.U;


public class BestMT extends C2EMT {

	public static void main(String[] args) throws Exception {
	}
	
	@Override
	public String translate(String query) throws Exception {
		
		//get multiple results
		HashMap<String, String> results = new HashMap<String, String>();
		results.put(BaiduMT.class.getName(), new BaiduMT().translate(query));
		results.put(YoudaoMT.class.getName(), new YoudaoMT().translate(query));
		results.put(GoogleMT.class.getName(), new GoogleMT().translate(query));
		
		double rand =U.getRandomNum();
		if(rand<=0.2)
			return results.get(YoudaoMT.class.getName());
		else if (0.2<rand && rand<=0.6)
			return results.get(GoogleMT.class.getName());
		return results.get(BaiduMT.class.getName());
	}

}
